package com.huawei.appmarket.service.infoflow.card;

import android.content.Context;
import android.text.TextUtils;
import androidx.databinding.ViewDataBinding;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appgallery.foundation.ui.framework.widget.imageview.RoundedCornerImageView;
import com.huawei.appmarket.service.infoflow.bean.InfoFlowTripleAppSnapShotsCardBean;
import com.huawei.appmarket.service.infoflow.cards.card.BaseInfoFlowCard;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import o.epv;
import o.eqx;
import o.era;
import o.ewx;

public class InfoFlowTripleAppSnapShotsCard extends BaseInfoFlowCard<ewx> {
    public /* synthetic */ void ˊ(ViewDataBinding viewDataBinding) {
        ˎ((ewx) viewDataBinding);
    }

    public InfoFlowTripleAppSnapShotsCard(Context context) {
        super(context);
    }

    public void ˎ(ewx o_ewx) {
        super.ˊ(o_ewx);
        ˋ(o_ewx.ʼ);
        ˏ(o_ewx.ˋ);
        o_ewx.ˋ.setClickable(false);
        ॱ(o_ewx.ॱ);
        o_ewx.ᐝ.getLayoutParams().height = (int) (((float) this.ˋ) * epv.ʼ());
    }

    public void ˏ(CardBean cardBean) {
        List list;
        super.ˏ(cardBean);
        ((ewx) ʾ()).ˊॱ.setText("");
        ((ewx) ʾ()).ˏॱ.setVisibility(8);
        ((ewx) ʾ()).ˏ.setText("");
        if (cardBean instanceof InfoFlowTripleAppSnapShotsCardBean) {
            InfoFlowTripleAppSnapShotsCardBean infoFlowTripleAppSnapShotsCardBean = (InfoFlowTripleAppSnapShotsCardBean) cardBean;
            List ˊ = infoFlowTripleAppSnapShotsCardBean.ˊ();
            ˋ(((ewx) ʾ()).ˊॱ, infoFlowTripleAppSnapShotsCardBean.ˋʻ());
            ˊ(infoFlowTripleAppSnapShotsCardBean);
            list = ˊ;
        } else {
            list = null;
        }
        ˎ(list);
    }

    private void ˎ(List<String> list) {
        int i = 0;
        ArrayList arrayList = new ArrayList(Arrays.asList(new RoundedCornerImageView[]{((ewx) ʾ()).ʽ, ((ewx) ʾ()).ॱॱ, ((ewx) ʾ()).ͺ}));
        while (i < arrayList.size()) {
            String str = (list == null || list.size() <= i) ? null : (String) list.get(i);
            ॱ(str, (RoundedCornerImageView) arrayList.get(i));
            i++;
        }
    }

    private void ॱ(String str, RoundedCornerImageView roundedCornerImageView) {
        roundedCornerImageView.ˊ("image_default_icon").ˊ(new era()).ˏ(str).ˎ();
    }

    private void ˊ(InfoFlowTripleAppSnapShotsCardBean infoFlowTripleAppSnapShotsCardBean) {
        if (infoFlowTripleAppSnapShotsCardBean.ٴ() != 0) {
            ((ewx) ʾ()).ˏ.setText(infoFlowTripleAppSnapShotsCardBean.ߴ());
            Object ՙ = infoFlowTripleAppSnapShotsCardBean.ՙ();
            if (TextUtils.isEmpty(ՙ)) {
                ((ewx) ʾ()).ˏॱ.setVisibility(8);
                return;
            }
            ((ewx) ʾ()).ˏॱ.setVisibility(0);
            eqx.ˎ(((ewx) ʾ()).ˏॱ, ՙ);
            return;
        }
        ((ewx) ʾ()).ˏॱ.setVisibility(8);
        ((ewx) ʾ()).ˏ.setText(infoFlowTripleAppSnapShotsCardBean.ˏˏ());
    }

    public void w_() {
        eqx.ˏ(this.ʽॱ, this.ˊᐝ.ॱˌ(), "app_default_icon");
    }
}
